#!/usr/bin/env sh
#rm /tmp/logdata
touch /tmp/logdata
tail -f /tmp/logdata | nc -lk 9999 &
TAIL_NC_PID=$!
i=0
while(( $i<=100 ))
do
    cat ./log2.log >> /tmp/logdata
    sleep 1
    let "i++"
done
kill $TAIL_NC_PID
